# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=perl-net-write-fast
_pkgname=Net-Write-Fast
pkgver=0.18
pkgrel=8
pkgdesc='Create and inject packets fast.'
arch=('x86_64' 'aarch64')
url='https://metacpan.org/pod/Net::Write::Fast'
license=('GPL' 'PerlArtistic')
depends=('perl-time-interval')
options=('!emptydirs')
source=("https://cpan.metacpan.org/authors/id/G/GO/GOMOR/$_pkgname-$pkgver.tar.gz")
sha512sums=('237c37a3f225850e314c98d252209355dbfb5c45298d662a9c4668d5873571bcf6683792b7573aea388e033326c93e409e84254192dfd1eb9eebd56fe8f1fcf1')

prepare() {
  cd "$_pkgname-$pkgver"

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
  cd "$_pkgname-$pkgver"

  make
}

package() {
  cd "$_pkgname-$pkgver"

  make DESTDIR="$pkgdir" install

  find "$pkgdir" -name '.packlist' -o -name '*.pod' -delete
}

